Skip to content

Fix conditional import of prettier-plugin-svelte#332

Merged
byara merged 1 commit into
trivago:v5.2.0from
rsslldnphy:another-fix-attempt
Dec 8, 2024
Merged

Fix conditional import of prettier-plugin-svelte#332
byara merged 1 commit into
trivago:v5.2.0from
rsslldnphy:another-fix-attempt

Conversation

@rsslldnphy
Copy link
Copy Markdown
Contributor

As @lmeerma points out in #330 the issue with conditionally importing the svelte plugin is caused by trying to access a key on the potentially undefined parsers value. This PR fixes this to avoid the issue. Tested on my codebase and works great.

Copy link
Copy Markdown
Collaborator

@byara byara left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for spotting the bug and fixing it!

@byara byara merged commit b769c7c into trivago:v5.2.0 Dec 8, 2024
@byara byara mentioned this pull request Dec 9, 2024
byara added a commit that referenced this pull request Dec 9, 2024
* Fix conditional import of prettier-plugin-svelte (#332)

* Fix type import ordering (#331)

* fix type import ordering

* Add a snapshot test for the bugfix

* clean up

---------

Co-authored-by: Russell Dunphy <russell@russelldunphy.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants